TypeScript 97.4%
SQL 1%
JavaScript 0.9%
CSS 0.6%
1import { withUser, json } from "@/lib/api";2import { deleteArenaSession, getArenaSession } from "@/lib/arena/service";34export const dynamic = "force-dynamic";5type P = { id: string };67/** GET /api/arena/:id → { session } (responses + votes, owner only). */8export const GET = withUser<P>(async ({ user }, { id }) => json({ session: await getArenaSession(user.id, id) }));910/** DELETE /api/arena/:id → { ok } — removes the session, its responses, votes and share links. */11export const DELETE = withUser<P>(async ({ user }, { id }) => {12 await deleteArenaSession(user.id, id);13 return json({ ok: true });14});15